package com.chorye.mongo.config;

import lombok.Data;
import org.springframework.boot.autoconfigure.mongo.MongoProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @Company: 北京XXXX有限公司
 * @Author JiangYy
 * @Title: MultipleMongoProperties
 * @Description: 封装读取以mongodb开头的两个配置文件
 * @Date 2018/12/24 15:56
 */
@Data
@ConfigurationProperties(prefix = "mongodb")
@Configuration
public class MultipleMongoProperties {
    /**
     * 主数据源配置信息
     */
    private MongoProperties primary = new MongoProperties();
    /**
     * 从数据源配置信息
     */
    private MongoProperties secondary = new MongoProperties();
}
